package site.suimu.service.impl;

import org.springframework.stereotype.Service;
import site.suimu.mapper.THistoryMapper;
import site.suimu.pojo.THistory;
import site.suimu.service.THistoryService;

import javax.annotation.Resource;
import java.util.List;
@Service
public class THistoryServiceImpl implements THistoryService {

    @Resource
    THistoryMapper tHistoryMapper;

    public boolean ins(THistory tHistory) {
        if (tHistoryMapper.create(tHistory)>0){
            return true;
        }
        return false;
    }

    public boolean dle(int id) {
        if (tHistoryMapper.delete(id)>0){
            return true;
        }
        return false;
    }

    public List<THistory> sleByUid(int uid) {
        return tHistoryMapper.selectByUid(uid);
    }
}
